import useDictStore from '@/store/modules/dict'
import { listDriver  } from "@/api/mes/projectExtend";

// 查询客户管理列表
export function mesDriverList(dictType) {
  const res = ref({});
  return (() => {
    res.value[dictType] = [];
    listDriver().then(resp => {
      res.value[dictType] = resp.data.map(item => ({ 
        value: item.userId.toString(),
        label: item.nickName,
        elTagType: "default", elTagClass: null 
      }))
      useDictStore().setDict(dictType, res.value[dictType]);
    })
    return toRefs(res.value);
  })()
}
